package com.chongbangbang.service.impl;

import com.chongbangbang.mapper.PetInfoMapper;
import com.chongbangbang.pojo.PetInfo;
import com.chongbangbang.service.PetInfoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * <p>
 * 宠物基本信息 服务实现类
 * </p>
 *
 * @author TP
 * @since 2022-03-16 15:20:37
 */
@Service
public class PetInfoServiceImpl extends ServiceImpl<PetInfoMapper, PetInfo> implements PetInfoService {


    @Autowired
    private PetInfoMapper petInfoMapper;
    /**
     * 根据用户ID查询宠物
     * @param userId
     * @return
     */
    @Override
    public List<PetInfo> getByUserId(Integer userId) {
        return petInfoMapper.getByUserId(userId);
    }
}
